<?php

namespace app\admin\model;

use think\Model;

class UserAccount extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'ty_user_account';

    //指定主见
    protected $pk = 'ua_id';

    //只读字段
    //protected $readonly = ['name','email'];

    //自动写入时间戳
    //protected $autoWriteTimestamp = true;

    //自动写入日期
    //protected $autoWriteTimestamp = 'datetime';

    // 设置返回数据集的对象名
    protected $resultSetType = 'collection';

    // 定义时间戳字段名
    protected $createTime = 'ua_update_time';
    protected $updateTime = 'ua_create_time';

    public static function zselect($where)
    {
        return self::where('ua_phone',$where['hr_owner_phone'])->find();
    }

    public static function zcreate($param)
    {
        return self::create($param);
    }

}
